﻿using System;

namespace Database.Core.Attributes
{
  /// <summary>
  /// Defines a friendly name for an enum value. Used for automatic column value mapping to friendly name.
  /// </summary>
  [AttributeUsage(AttributeTargets.Field)]
  public class StringValueAttribute : Attribute
  {
    /// <summary>
    /// Gets the friendly name.
    /// </summary>
    /// <value>The friendly name.</value>
    public string StringValue { get; private set; }

    /// <summary>
    /// Initializes a new instance of the <see cref="StringValueAttribute"/> class.
    /// </summary>
    /// <param name="value">The friendly name.</param>
    public StringValueAttribute(string value)
    {
      StringValue = value;
    }
  }
}
